package com.lcf.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

import java.util.UUID;

/**
 * Created by lancf on 2019/4/26.
 */
@Repository
public class LogDao {

    @Autowired
    public JdbcTemplate jdbcTemplate;

    public void addLog(String param){
        String sql="insert into t_log(id,param) values(?,?)";
        String id= UUID.randomUUID().toString().replace("-","");
        int update = jdbcTemplate.update(sql,id, param);

        System.out.println("插入日志数据------>"+update);
    }

}
